﻿// GlobalVariables.cpp: 实现文件
//

#include "stdafx.h"
#include "MesTest.h"
#include "GlobalVariables.h"
#include "MesSocketTcp.h"


// GlobalVariables

IMPLEMENT_DYNAMIC(GlobalVariables, CWnd)

GlobalVariables::GlobalVariables()
{

}

GlobalVariables::~GlobalVariables()
{
}


BEGIN_MESSAGE_MAP(GlobalVariables, CWnd)
END_MESSAGE_MAP()

CString g_FilePathPLC;  //PLC路径
CString g_FilePathLog;  //日志路径
CString g_SystemPathPLC;  //系统参数路径
CString g_MESPathLog;  //MES路径
AddressPLC g_PLCAddress;  //PLC地址
InfoMES g_InfoMes;  //MES信息
Land g_Land; //账号密码信息
DHInterface* g_pPlc = NULL; //Plc通信模块
DHInterface* g_pWatch = NULL;
PLCData g_PLCData;  //发送数据
PVOID        g_pMainDialog = NULL;       //主对话框;

CRITICAL_SECTION m_csChange;
BOOL  g_bUseMes;
BOOL  g_bUsePlc;
CString g_cstrFilePath="";
CString g_cstrErrorFilePath="";
CResultOperation g_SendData;
HTuple  g_hvHeartBeatStartTime=0;
HTuple  g_hvHeartBeatEndTime=0;
int g_nType=0;//类型
int g_nNGLENGTH=0;//NG地址长度
std::vector<MateFeedingInfo> vec_FeedMes;
int g_nWorkFlag=0;
int g_nConnectStatus=0;
int g_nMsgNo=1;
HTuple  g_hvMes1 = NULL;
HTuple  g_hvMes2 = NULL;
HTuple  g_hvMes3 = NULL;
HTuple  g_hvMes4 = NULL;
HTuple  g_hvMes5 = NULL;

CString g_cstrOKDanJiaStartTime="";
CString g_cstrNGDanJiaStartTime="";
CString g_cstrSendDanJiaStartTime="1";